package com.iqismart.shorturl.controller.api.report;

import com.iqismart.shorturl.service.ReportService;
import com.iqismart.shorturl.vo.ReportRequest;
import com.iqismart.shorturl.vo.ReportResponse;
import com.iqismart.shorturl.vo.base.Result;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.CrossOrigin;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * @Description
 * @Auther sty
 * @createTime 2019/10/14 01:32
 */
@RestController
@RequestMapping("report")
@CrossOrigin
public class ReportController {

    @Autowired
    private ReportService reportService;

    @RequestMapping("add")
    public Result<ReportResponse> add(@RequestBody ReportRequest request){
        ReportResponse response =  reportService.add(request);
        return new Result(response);
    }


}
